<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--360浏览器优先以webkit内核解析-->
    <title>若依介绍</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/>
</head>
<style>
    .welcome-message {
        text-align: center;
        margin-top: 50px;
        margin-bottom: 30px; /* 调整上下边距 */
    }

    .welcome-message h1 {
        font-size: 36px;
        font-family: Arial, sans-serif;
    }
    #current-time {
        text-align: center;
        margin-top: 30px; /* 调整上下边距 */
        font-size: 36px;
        font-family: Arial, sans-serif;
    }
</style>
<body class="gray-bg">

    <div class="welcome-message">
        <h1>欢迎进入任务派发管理系统</h1>
    </div>

    <div id="current-time">
        当前时间：
    </div>
</body>

<script>
    // 获取当前时间
    function getCurrentTime() {
        var currentTime = new Date();
        var hours = currentTime.getHours();
        var minutes = currentTime.getMinutes();
        var seconds = currentTime.getSeconds();

        // 如果小时、分钟、秒钟小于10，则在其前面加上0
        hours = (hours < 10 ? "0" : "") + hours;
        minutes = (minutes < 10 ? "0" : "") + minutes;
        seconds = (seconds < 10 ? "0" : "") + seconds;

        // 将时间显示在页面上
        document.getElementById("current-time").innerHTML = "当前时间：" + hours + ":" + minutes + ":" + seconds;
    }

    // 每秒更新一次时间
    setInterval(getCurrentTime, 1000);

    // 页面加载时获取当前时间
    getCurrentTime();
</script>
</html>
